package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author zhuanning
 * @Date 2022/3/19 8:12 下午
 * @Description
 */
@FeignClient("gulimall-product")
public interface ProductFeignService {
    /***
     * 1.让所有请求经过网关 @FeignClient("gulimall-gateway") 给网关发送请求 路径需要带上/api/product
     * 2.直接让后台指定服务处理，推荐
     */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    R info(@PathVariable("skuId") Long skuId);
}
